Wallet
is defined by the IWallet
interface. There are currently 2 implementations of the IWallet
interface in this SDK.
EOAWallet
is a standard EOA wallet for EVM chains.
An EOAWallet is easily created:
SequenceWalletToEOAWalletAdapter
is an adapter that allows you to use a SequenceWallet
with the same IWallet
interface as an EOAWallet
so that it may be used interchangeably with EOA wallets throughout the rest of the SequenceEthereum library.
A SequenceWalletToEOAWalletAdapter is easily created once you have a SequenceWallet:
IWallet
interface provides a number of methods for you. The most important of which are:
Address
for the wallet
EthTransaction
and submits it via the given client
EthTransaction
and submits it via the given client then waits for the TransactionReceipt
EthTransaction[]
and submits them via the given client.
If wallet is an EOAWallet
, the transactions will be submitted sequentially, each of which may pass or fail. If the wallet is a SequenceWalletToEOAWalletAdapter
, the transactions will be batched together into a single transaction that is submitted all at once and either passes or fails as a whole.
Similarly, if a wallet is an EOAWallet
the string[]
(transaction hashes) you receive will be equal in length to the EthTransaction[]
you submitted. While, if the wallet is a SequenceWalletToEOAWalletAdapter
, you will only receive one transaction hash (string[]
of length 1)
EthTransaction[]
and submits them via the given client then waits for the TransactionReceipt[]
.
If wallet is an EOAWallet
, the transactions will be submitted sequentially, each of which may pass or fail. If the wallet is a SequenceWalletToEOAWalletAdapter
, the transactions will be batched together into a single transaction that is submitted all at once and either passes or fails as a whole.
Similarly, if a wallet is an EOAWallet
the TransactionReceipt[]
you receive will be equal in length to the EthTransaction[]
you submitted. While, if the wallet is a SequenceWalletToEOAWalletAdapter
, you will only receive one transaction receipt (TransactionReceipt[]
of length 1)
Chain
object (recommended), you can use the AsString
method to get the hexadecimal format of the chain id